home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Copyright (C) 1992 Ronin Consulting, Inc.
- **
- ** This program is free software; you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation; version 1.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program; if not, write to the Free Software
- ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
- /*
- ** This object is designed to simplyfy the use of the NeXT defaults facilities.
- **
- */
-
- #import <objc/Object.h>
- #import <defaults/defaults.h>
-
- @interface Defaults : Object
- {
- const char *appName;
- BOOL registered;
- }
-
- /*
- ** This is a shared object so allocate it with new.
- */
- + new;
-
- /*
- ** Register a defaults vector. If no vector is registered before a get/set (or any other) call is
- ** used then an empty vector is used.
- */
- - regDefaults: (NXDefaultsVector) defaultsVector;
-
- /*
- ** Get/Set a default.
- */
- - (const char *) get: (char *) aDefault;
- - set: (char *) aDefault to: (char *)aValue;
-
- /*
- ** Get/Set that Ignore the cached values and use the actual database.
- */
- - (const char *) readDB: (char *) aDefault;
- - writeDB: (char *) aValue as: (char *)aValue;
-
- /*
- ** Remove a default from the database.
- */
- - remove: (char *) aDefault;
-
- /*
- ** Write a cached default out to the file.
- */
- - update: (char *) aDefault;
-
- /*
- ** Update ALL cached values.
- */
- - update;
-
- @end
-
-
-